<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>SQLForce Credential Registry</title>
</head>
<body>
<H1>SQLForce Credential Registry</H1>
<p>
Though a connection to SalesForce can always be established using a command like:
<pre style='margin-left:.5in'>
CONNECT PRODUCTION gsmithfarmer@gmail.com myPassword mySecurityToken
</pre>
this technique gets old in a hurry. Besides, credentials should not be included in scripts. This document describes
how to keep your Salesforce credentials in a simple profile registry.
</p>
<h2>The Second Form of the CONNECT Command</h2>
<p>
The second form of the CONNECT command is:
<pre style='margin-left:.5in'>
CONNECT PROFILE profileName
</pre>
where the system looks up the corresponding username, password, etc. based on the provided <i>profileName</i>.
Profile names will be automatically registered with SQLForce if they are defined in a file named <i>sqlforce.ini</i>
that exists in the users home directory (%USERPROFILE%\sqlforce.ini or $HOME/sqlforce.ini).
<p><i>sqlforce.ini</i> must be an XML file that follows this format:</p>
</p>
<pre style='margin-left:.5in'>
&lt;sqlforce&gt;
	&lt;connection 
		name="main"
		type="Production"
		username="gsmithfarmer@gmail.com"
		password="yourPassword"
		token="MGwH9RsGCgfUhwkd4iXfYYYYY"
	/&gt;
	&lt;connection 
		name="test"
		type="Sandbox"
		username="gsmithfarmer@gmail.com"
		password="yourPassword"
		token="MGwH9RsGCgfUhwkd4iXfZZZZZ"
	/&gt;
&lt;/sqlforce&gt;
</pre>
Where:
<ul>
<li>name - name of the profile. This is the value that can be used in a CONNECT statement.</li>
<li>type - PRODUCTION or SANDBOX</li>
<li>username - Salesforce username</li>
<li>password - Salesforce password</li>
<li>token - Salesforce supplied security token</li>
</ul>
</body>
</html>